import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/home/index.vue'
import TabBar from '../components/TabBar.vue'
const routes = [
  {
    path: '/',
    name: 'home',
    components: {
       default:Home,
       footer:TabBar
    }
  },
  {
    path: '/cart',
    name: '购物车',
    components:{
      default:() => import( '@/views/cart/index.vue'),
       footer:TabBar
    } 
  },
   {
    path: '/kind',
    name: '分类',
    components:{
      default:() => import( '@/views/kind/index.vue'),
       footer:TabBar
    } 
  },
   {
    path: '/user',
    name: '我的',
    components:{
      default:() => import( '@/views/user/index.vue'),
       footer:TabBar
    } 
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
